<?php
namespace app\admin\controller;
use think\Controller;
use think\Db;

class Main extends Controller
{
    /**
     * 初始化
     *现在初始化里面定义后边要使用的redis参数
    */

	public function _initialize(){
        parent::_initialize();
        $coupon_id = I("coupon_id",'0','intval');      
        if($coupon_id){
            $this->goods_id = $coupon_id;
            $this->user_queue_key = "goods_".$goods_id."_user";//当前商品队列的用户情况
            $this->goods_number_key = "goods".$goods_id;//当前商品的库存队列
        }
        $this->user_id = $this->user_id ? $this->user_id : $_SESSION['uid'];      
    }
}
